package com.lib76.DBInfo.model.po.mysql;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * MYSQL数据列信息
 * @author 张浩
 * @version 0.0.1
 */
@Entity
@Table(name="COLUMNS")
public class TableColumn {
	
	public final static String KEY = "PRI";

	@EmbeddedId
	private TableColumnKey id;
	@Column(name="CHARACTER_MAXIMUM_LENGTH")
	private Long charMaxLength;
	@Column(name="DATA_TYPE")
	private String dataType;
	@Column(name="IS_NULLABLE")
	private Boolean isNullable;
	@Column(name="COLUMN_DEFAULT")
	private Object defaultValue;
	@Column(name="COLUMN_KEY")
	private String columnKey;
	@Column(name="COLUMN_COMMENT")
	private String comment;
	
	public TableColumnKey getId() {
		return id;
	}
	public void setId(TableColumnKey id) {
		this.id = id;
	}
	public Long getCharMaxLength() {
		return charMaxLength;
	}
	public void setCharMaxLength(Long charMaxLength) {
		this.charMaxLength = charMaxLength;
	}
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public Boolean getIsNullable() {
		return isNullable;
	}
	public void setIsNullable(Boolean isNullable) {
		this.isNullable = isNullable;
	}
	public Object getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(Object defaultValue) {
		this.defaultValue = defaultValue;
	}
	public String getColumnKey() {
		return columnKey;
	}
	public void setColumnKey(String columnKey) {
		this.columnKey = columnKey;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	public String getTableSchema() {
		return id.getTableSchema();
	}
	public String getTableName() {
		return id.getTableName();
	}
	public String getColumnName() {
		return id.getColumnName();
	}
}
